home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mint110s / signal.h < prev    next >
C/C++ Source or Header  |  1993-08-16  |  2KB  |  61 lines

  1. #define    NSIG        31        /* number of signals recognized */
  2.  
  3. #define    SIGNULL        0        /* not really a signal */
  4. #define SIGHUP        1        /* hangup signal */
  5. #define SIGINT        2        /* sent by ^C */
  6. #define SIGQUIT        3        /* quit signal */
  7. #define SIGILL        4        /* illegal instruction */
  8. #define SIGTRAP        5        /* trace trap */
  9. #define SIGABRT        6        /* abort signal */
  10. #define SIGPRIV        7        /* privilege violation */
  11. #define SIGFPE        8        /* divide by zero */
  12. #define SIGKILL        9        /* cannot be ignored */
  13. #define SIGBUS        10        /* bus error */
  14. #define SIGSEGV        11        /* illegal memory reference */
  15. #define SIGSYS        12        /* bad argument to a system call */
  16. #define SIGPIPE        13        /* broken pipe */
  17. #define SIGALRM        14        /* alarm clock */
  18. #define SIGTERM        15        /* software termination signal */
  19.  
  20. #define SIGURG        16        /* urgent condition on I/O channel */
  21. #define SIGSTOP        17        /* stop signal not from terminal */
  22. #define SIGTSTP        18        /* stop signal from terminal */
  23. #define SIGCONT        19        /* continue stopped process */
  24. #define SIGCHLD        20        /* child stopped or exited */
  25. #define SIGTTIN        21        /* read by background process */
  26. #define SIGTTOU        22        /* write by background process */
  27. #define SIGIO        23        /* I/O possible on a descriptor */
  28. #define SIGXCPU        24        /* CPU time exhausted */
  29. #define SIGXFSZ        25        /* file size limited exceeded */
  30. #define SIGVTALRM    26        /* virtual timer alarm */
  31. #define SIGPROF        27        /* profiling timer expired */
  32. #define SIGWINCH    28        /* window size changed */
  33. #define SIGUSR1        29        /* user signal 1 */
  34. #define SIGUSR2        30        /* user signal 2 */
  35.  
  36. #define       SIG_DFL    0
  37. #define       SIG_IGN    1
  38. #define       SIG_ERR    -1
  39.  
  40. /* which signals are not maskable? */
  41. #define UNMASKABLE (1L | (1L << SIGKILL) | (1L << SIGCONT) | (1L << SIGSTOP))
  42.  
  43. /* which signals are stop signals? */
  44. #define STOPSIGS ((1L<< SIGTTIN)|(1L<< SIGTTOU)|(1L<< SIGTSTP)|(1L<<SIGSTOP))
  45.  
  46. /* sigaction: extended POSIX signal handling facility */
  47.  
  48. struct sigaction {
  49.     ulong    sa_handler;    /* pointer to signal handler */
  50.     ulong    sa_mask;    /* additional signals masked during delivery */
  51.     ushort    sa_flags;    /* signal specific flags */
  52. /* signal flags */
  53. #define SA_NOCLDSTOP    1    /* don't send SIGCHLD when child stops */
  54. #define SA_RESET    0x8000    /* reset to SIG_DFL just before delivery */
  55. };
  56.  
  57.  
  58. #define SAUSER        (SA_NOCLDSTOP)    /* signal flags which the process may set */
  59. #define SAPARENT    (0)        /* signal flags which the parent (of ptraced) processes may set */
  60. #define SAKERNEL    (SA_RESET)    /* kernel only flags */
  61.